<template>
  <view class="Modal_mask">
    <view class="Modal_Modal">
      <view class="Modal_title">
        <text class="title">{{ title }}</text>
        <view class="colse">
          <button @click.stop="closes"><uni-icon type="closeempty" size="25" color="#fff"></uni-icon></button>
        </view>
      </view>
      <view class="Model_conter"><slot></slot></view>
    </view>
  </view>
</template>

<script>
import uniIcon from "@/components/uni-icon/uni-icon.vue"
export default {
  name: 'winmax-modal',
  components: { uniIcon },
  props: {
    title: {
      type: String
    },
    isShowClose: {
      type: Boolean,
      default: true
    }
  },
  data() {
    return {};
  },
  methods: {
    hideModal() {
      if (this.isMask) {
        this.$emit('close');
      }
    },
    closes() {
      this.$emit('close');
    }
  }
};
</script>

<style lang="scss">
.Modal_mask {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.4);
  .Modal_Modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600upx;
    background: #fff;
    border-radius: 8upx;
    .Modal_title {
      position: relative;
      height: 75upx;
      .title {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 32upx;
        color: #000000;
      }
      .colse {
        z-index: 2;
        position: absolute;
        height: 75upx;
        top: 0;
        bottom: 0;
        right: 20upx;
        display: flex;
        justify-content: center;
        align-items: center;
        button {
          height: 50upx;
          width: 50upx;
          padding: 0;
          line-height: 50upx;
          display: flex;
          justify-content: center;
          align-items: center;
          background: #ff6100;
          border: none;
          border-radius: 50upx;
          &::after {
            display: none;
          }
        }
      }
    }
  }
}
</style>
